function sleep(ms){
    return new Promise(resolve=>{
        setTimeout(resolve,ms)
    })
}

console.log('start')
sleep(1000).then(()=>{
    console.log('end')
})